
public class TaxiStation {
	private String _stationName;
	private Taxi [] _taxies ;
	private int _taxiCount;
	final int MAX = 80;
	
	
	public TaxiStation(String sname)
	{
		_taxies = new Taxi[MAX];
		_stationName=sname;
		_taxiCount=0;
	}
	
	
	public void  addTaxi(String dname,String licenseId,int seats)
	{
		_taxies [_taxiCount] = new Taxi(licenseId,dname,seats);
		_taxiCount++;
		
	}
	
	public int getTaxiCount ()
	{
		return _taxiCount;
	}
	
	
	public int lookBySeats(int seatsNumber)
	{
		int numbSeats=0;
		
		for (int i=0;i<_taxiCount;i++)
		{
			if(_taxies[i].getIsAvailable() && _taxies[i].getNumPass() == seatsNumber )
				numbSeats++;
			
		}
		
		return numbSeats;
		
	}
	public String orderTaxi (int seatsNumber)
	{
				
		for (int i=0;i<_taxiCount;i++)
		{
			if(_taxies[i].getIsAvailable() && _taxies[i].getNumPass() >= seatsNumber )
			{
				_taxies[i].taxiBusy();
				
				return _taxies[i].getId();
				
			}
		}
		
		return "-1";
		
		
		
	}

}
